package com.hh.entity.dto;


import com.hh.entity.Login;
import com.hh.entity.Student;
import lombok.Data;
/*
 * 学生详细信息DTO
 * @author huxy
 * */

@Data
public class LoginStudentDTO extends Student {

    private Integer roleId;

    private String loginPwd;

    public Student getStudent(LoginStudentDTO loginStudentDTO){
        Student student = new Student();
        student.setBirthday(loginStudentDTO.getBirthday());
        student.setClassId(loginStudentDTO.getClassId());
        student.setCollegeId(loginStudentDTO.getCollegeId());
        student.setEnrollmentDate(loginStudentDTO.getEnrollmentDate());
        student.setGrade(loginStudentDTO.getGrade());
        student.setGraduateSchool(loginStudentDTO.getGraduateSchool());
        student.setLoginId(loginStudentDTO.getLoginId());
        student.setMajorId(loginStudentDTO.getMajorId());
        student.setNation(loginStudentDTO.getNation());
        student.setNativePlace(loginStudentDTO.getNativePlace());
        student.setSPhone(loginStudentDTO.getSPhone());
        student.setStudentId(loginStudentDTO.getStudentId());
        student.setStudentName(loginStudentDTO.getStudentName());
        student.setStudentSex(loginStudentDTO.getStudentSex());
        student.setStudentUid(loginStudentDTO.getStudentUid());
        return student;
    }
    public Login getLogin(LoginStudentDTO loginStudentDTO){
        Login login = new Login();
        login.setLoginId(loginStudentDTO.getLoginId());
        login.setLoginPwd(loginStudentDTO.getLoginPwd());
        login.setRoleId(loginStudentDTO.getRoleId());
        return login;
    }
}
